﻿#include <stdio.h>
#include <math.h>
#include "Encryption.h"

void StringPrint(char c[ ])
{
	int i = 0;
	for (i = 0; i < 5; i++) {
		printf("%c", c[i]);
		if (i == 4) printf("\n");
	}
}

void Encryption(char c[])
{
	int i = 0;
	for (i = 0; i < 5; i++) {
		c[i] = c[i] + 4;
	}
}

int CodeBreaking()
{
	char c[5] = { 'C','h','i','n','a' };
	printf("加密前，原文为：");
	StringPrint(c);
	printf("加密后，密文为：");
	Encryption(c);
	StringPrint(c);

	return 0;

}